package com.singleton;

/**
 * 
 * @author 懒汉式
 *	
 */
public class Singleton {

	private static Singleton instance;
	private static Object syncRoot = new Object();

	private Singleton() {

	}

	public static Singleton getInstanse() {
		if (instance == null) {
			synchronized (syncRoot) {
				if (instance == null) {
					return new Singleton();
				}
			}
		}
		return instance;
	}

}
